import request from '@/API/request'


export const Login = params => {
    // 登录接口
    return request.post(`/user/login/`, params)
}

export const Register = params => {
    // 注册接口
    return request.post(`/user/register/`, params)
}


export const SendEmailCode = params => {
    return request.post('/user/send/email/code/', params)
}


export const refreshToken = params => {
    // 刷新Token接口
    return request.post(`/user/refresh/`, params)
}
export const getJobs = params => {
    // 获取工作接口
    return request.get(`info/jobs`, params)
}
export const getGenericSelect = params => {
    // 获取选择器类型接口
    return request.get(`/info/generic`, params)
}
export const getMenus = params => {
    // 获取主页菜单接口
    return request.get(`/menus`, {params: params})
}

export const getAvgSelery = params => {
    // 获取平均薪资接口
    return request.get(`/info/salary/city`, {params: params})
}

export const getJobDetail = params => {
    // 获取工作详细信息接口
    return request.get('/info/job', {params: params})
}
export const getHomeInfo = params => {
    // 获取主页信息接口
    return request.get('/info/home',)
}

export const recommend = params => {
    // 获取推荐数据接口
    return request.get('/info/job/recommend')
}


export const getPositionCountDistribution = params => {
    // 获取工作数据的位置分布接口
    return request.get('/info/distribution/position/count')
}

export const getPositionSalaryDistribution = params => {
    // 获取工作薪资的位置分布接口
    return request.get('/info/distribution/position/salary')
}


export const getPositionDetailDegreeOrExpCountDistribution = (position, type) => {
    // 获取行业/工作经验/数量数据分布
    return request.get('info/distribution/position/detail/count', {"params": {position, type}})
}


export const getPositionDetailDegreeOrExpSalaryDistribution = (position, type, salary) => {
    // 获取行业/工作经验/平均薪资数据分布
    return request.get('info/distribution/position/detail/salary', {"params": {type, salary, position}})
}

export const getJobParticiple = params => {
    return request.get('info/job/participle', {params: params})
}
export const PredictSalary = params => {
    return request.get('info/job/predict/salary', {params: params})
}


export const Record = params => {
    return request.get('info/job/record', )
}


